<?php


use yii\helpers\Url;
$web = Url::base();

?>
<script>
    $(function($){
        $("#cb_is_month_budget").bootstrapSwitch('state',false);
        $('#cb_is_month_budget').on('switchChange.bootstrapSwitch', function (e, data) {
            if(data){
                $('#div_month').show();
            }else{
                $('#div_month').hide();
            }

        });
    });
</script>
<div>

    <form class="form-inline" id="modaledit_submit_form" method="post" enctype="multipart/form-data"
          action="edit-goods-extend-category" >
        <input type="hidden" name="edit_id" class="form-control" value="<?= $detail ? $detail['id'] : '' ?>">
        <input type="hidden" name="edit_institution_code" class="form-control"
               value="<?= $institution_code ?>">
        <div class="form-group">
            <label>部门名称：</label>
            <select class="form-control" style=" width: 470px">
                <option>zzzz</option>
            </select>
        </div>
        <div class="form-group">
            <label>预算名称：</label>
            <input type="text" name="edit_name" class="form-control" value="<?= $detail ? $detail['name'] : '' ?>"
                   style="width: 470px">
        </div>
        <div class="form-group">
            <label>预算年份：</label>
            <input type="text" name="edit_name" class="form-control" value="<?= $detail ? $detail['name'] : '' ?>"
                   style="width: 470px">
        </div>
        <div class="form-group">
            <label>年份预算：</label>
            <input type="text" name="edit_name" class="form-control" value="0"
                   style="width: 470px">
        </div>
        <div class="form-group" style=" margin-top: 6px">
            <label>是否开启月预算：</label>
            <div class="switch">
                <input id="cb_is_month_budget" type="checkbox" checked/>
                <span>启用  </span>
            </div>
        </div>
        <br>
        <div id="div_month" style="display: none;">
            <div class="form-group">
                <label>月预算：</label>
            </div>

            <div class="form-group">
                <table>
                    <tr>
                        <td>
                            <label>1月：</label>
                            <input type="text" name="edit_name" class="form-control" value="0"
                                   >
                        </td>
                        <td>
                            <label>2月：</label>
                            <input type="text" name="edit_name" class="form-control" value="0"
                                   >
                        </td>
                        <td>
                            <label>3月：</label>
                            <input type="text" name="edit_name" class="form-control" value="0"
                                   >
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label>4月：</label>
                            <input type="text" name="edit_name" class="form-control" value="0"
                            >
                        </td>
                        <td>
                            <label>5月：</label>
                            <input type="text" name="edit_name" class="form-control" value="0"
                            >
                        </td>
                        <td>
                            <label>6月：</label>
                            <input type="text" name="edit_name" class="form-control" value="0"
                            >
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label>7月：</label>
                            <input type="text" name="edit_name" class="form-control" value="0"
                            >
                        </td>
                        <td>
                            <label>8月：</label>
                            <input type="text" name="edit_name" class="form-control" value="0"
                            >
                        </td>
                        <td>
                            <label>9月：</label>
                            <input type="text" name="edit_name" class="form-control" value="0"
                            >
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label>10月：</label>
                            <input type="text" name="edit_name" class="form-control" value="0"
                            >
                        </td>
                        <td>
                            <label>11月：</label>
                            <input type="text" name="edit_name" class="form-control" value="0"
                            >
                        </td>
                        <td>
                            <label>12月：</label>
                            <input type="text" name="edit_name" class="form-control" value="0"
                            >
                        </td>
                    </tr>
                </table>


            </div>

        </div>
    </form>
</div>
<script type="application/javascript" src="<?= $web ?>/js/bootstrap-switch.js"></script>